﻿Public Class F_R00

    Private Sub btnguardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguardar.Click
        If (Len(txtdominio.Text) = 0) Then
            MsgBox("EL dominio es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtdominio.Focus()
            Exit Sub
        End If
        Dim oFR00Negocios As New Negocios.NFR_00
        Dim oFR00 As New Entidades.EFR_00
        oFR00.domini = UCase(txtdominio.Text)
        oFR00.apenomm = UCase(txtapenom.Text)
        oFR00.nacionalidadd = UCase(txtnacionalidad.Text)
        oFR00.tipodocc = UCase(txttipodoc.Text)
        oFR00.numdocc = UCase(txtnumdoc.Text)
        oFR00.domicilioo = UCase(txtdomicilio.Text)
        oFR00.numm = UCase(txtnum.Text)
        oFR00.pisoo = UCase(txtpiso.Text)
        oFR00.dptoo = UCase(txtdpto.Text)
        oFR00.codpostall = UCase(txtcodpostal.Text)
        oFR00.localidadd = UCase(txtlocalidad.Text)
        oFR00.provinciaa = UCase(txtprovincia.Text)
        oFR00.clasee = UCase(txtclase.Text)
        oFR00.marcaa = UCase(txtmarca.Text)
        oFR00.modeloo = UCase(txtmodelo.Text)
        oFR00.añoo = UCase(txtaño.Text)
        oFR00.nummotorr = UCase(txtnummotor.Text)
        oFR00.numchasiss = UCase(txtnumchasis.Text)
        oFR00.capacidadd = UCase(txtcapacidad.Text)
        oFR00.pesoo = UCase(txtpeso.Text)
        oFR00.fecharadicacionn = UCase(txtfecharadicacion.Text)
        oFR00.fechafacturaa = UCase(txtfechafactura.Text)
        oFR00.xuno = UCase(txtX1.Text)
        oFR00.xdos = UCase(txtX2.Text)
        oFR00.xtres = UCase(txtX3.Text)
        oFR00.xcuatro = UCase(txtX4.Text)
        oFR00.xcinco = UCase(txtX5.Text)
        oFR00.xseis = UCase(txtX6.Text)
        oFR00.xsiete = UCase(txtX7.Text)
        oFR00.xocho = UCase(txtX8.Text)
        oFR00.observacioness = UCase(txtobservaciones.Text)
       
        Try
            If oFR00Negocios.guardarFR00(oFR00) Then
                MsgBox("La carga ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Carga fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnEditarAnverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarAnverso.Click

        If (Len(txtdominio.Text) = 0) Then
            MsgBox("EL dominio es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtdominio.Focus()
            Exit Sub
        End If
        Dim oFR00Negocios As New Negocios.NFR_00
        Dim oFR00 As New Entidades.EFR_00
        oFR00.domini = UCase(txtdominio.Text)
        oFR00.apenomm = UCase(txtapenom.Text)
        oFR00.nacionalidadd = UCase(txtnacionalidad.Text)
        oFR00.tipodocc = UCase(txttipodoc.Text)
        oFR00.numdocc = UCase(txtnumdoc.Text)
        oFR00.domicilioo = UCase(txtdomicilio.Text)
        oFR00.numm = UCase(txtnum.Text)
        oFR00.pisoo = UCase(txtpiso.Text)
        oFR00.dptoo = UCase(txtdpto.Text)
        oFR00.codpostall = UCase(txtcodpostal.Text)
        oFR00.localidadd = UCase(txtlocalidad.Text)
        oFR00.provinciaa = UCase(txtprovincia.Text)
        oFR00.clasee = UCase(txtclase.Text)
        oFR00.marcaa = UCase(txtmarca.Text)
        oFR00.modeloo = UCase(txtmodelo.Text)
        oFR00.añoo = UCase(txtaño.Text)
        oFR00.nummotorr = UCase(txtnummotor.Text)
        oFR00.numchasiss = UCase(txtnumchasis.Text)
        oFR00.capacidadd = UCase(txtcapacidad.Text)
        oFR00.pesoo = UCase(txtpeso.Text)
        oFR00.fecharadicacionn = UCase(txtfecharadicacion.Text)
        oFR00.fechafacturaa = UCase(txtfechafactura.Text)
        oFR00.xuno = UCase(txtX1.Text)
        oFR00.xdos = UCase(txtX2.Text)
        oFR00.xtres = UCase(txtX3.Text)
        oFR00.xcuatro = UCase(txtX4.Text)
        oFR00.xcinco = UCase(txtX5.Text)
        oFR00.xseis = UCase(txtX6.Text)
        oFR00.xsiete = UCase(txtX7.Text)
        oFR00.xocho = UCase(txtX8.Text)
        oFR00.observacioness = UCase(txtobservaciones.Text)

        Try
            If oFR00Negocios.guardarFR00(oFR00) Then
                MsgBox("La edición ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Edición fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        txtdominio.Text = ""
        txtapenom.Text = ""
        txtnacionalidad.Text = ""
        txttipodoc.Text = ""
        txtnumdoc.Text = ""
        txtdomicilio.Text = ""
        txtnum.Text = ""
        txtpiso.Text = ""
        txtdpto.Text = ""
        txtcodpostal.Text = ""
        txtlocalidad.Text = ""
        txtprovincia.Text = ""
        txtclase.Text = ""
        txtmarca.Text = ""
        txtmodelo.Text = ""
        txtaño.Text = ""
        txtnummotor.Text = ""
        txtnumchasis.Text = ""
        txtcapacidad.Text = ""
        txtpeso.Text = ""
        txtfecharadicacion.Text = ""
        txtfechafactura.Text = ""
        txtX1.Text = ""
        txtX2.Text = ""
        txtX3.Text = ""
        txtX4.Text = ""
        txtX5.Text = ""
        txtX6.Text = ""
        txtX7.Text = ""
        txtX8.Text = ""
        txtobservaciones.Text = ""
    End Sub

    Private Sub btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsalir.Click
        Me.Close()
    End Sub

    Private Sub btnF01V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01V.Click
        F01_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01M.Click
        F01_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01I_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01I.Click
        F01_VImp_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02V.Click
        F02_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02M.Click
        F02_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF04V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF04V.Click
        F04_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
        F04_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08V.Click
        F08_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08M.Click
        F08_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF11V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11V.Click
        F11_V_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF11M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11M.Click
        F11_M_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF12V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12V.Click
        F12_V.Show()
        Me.Close()
    End Sub

    Private Sub btnF12M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12M.Click
        F12_M.Show()
        Me.Close()
    End Sub

    Private Sub btnF99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF99.Click
        F99.Show()
        Me.Close()
    End Sub

    Private Sub btnF59M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF59M.Click
        F59_M.Show()
        Me.Close()
    End Sub

    Private Sub btnReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReverso.Click
        MsgBox("El presente formulario no posee lado Reverso", MsgBoxStyle.DefaultButton1, Title:="INFORMACIÓN")
    End Sub
End Class
